//
//  RickyRefreshConst.h
//  Refresh
//
//  Created by weitayinqing on 15/9/23.
//  Copyright © 2015年 苏昌雄. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>

//*************************************刷新完成状态*********************************************//
typedef enum : NSUInteger{
    RickyRefreshCompleteTypeSuccess ,   //刷洗完成时返回正确的提示
    RickyRefreshCompleteTypeError ,     //刷新完成返回错误的提示
    RickyRefreshCompleteTypeNoData  //刷新完成时返回无数据提示
}RickyRefreshCompleteType;

//*************************************刷新控件类型*********************************************//
typedef enum : NSUInteger{
    RickyRefreshViewTypeHeader, //头部刷新控件
    RickyRefreshViewTypeFooter, //底部刷新控件
}RickyRefreshViewType;

//*************************************刷新控件状态*********************************************//
typedef enum : NSUInteger{
   RickyRefreshStateNormal,   //正常状态
   RickyRefreshStateReady,     //准备刷新状态
   RickyRefreshStateRefreshing //正在刷新状态
}RickyRefreshState;

/**刷新顶部视图正常标题*/
extern NSString *const  RickyHeaderNormalTitle;
/**刷新顶部视图正在刷新标题*/
extern NSString *const   RickyHeaderRefreshingTitle;
/**刷新顶部视图正在刷新成功标题*/
extern NSString *const   RickyHeaderSuccessCompleteTitle;
/**刷新顶部视图正在刷新失败标题*/
extern NSString *const   RickyHeaderErrorCompleteTitle;
/**刷新顶部视图正在刷新已是最新数据的标题*/
extern NSString *const   RickyHeaderNoDateCompleteTitle;

/**刷新底部视图正常标题*/
extern NSString *const RickyFooterNormalTitle;
/**刷新底部视图正常加载标题*/
extern NSString *const  RickyFooterRefreshingTitle;
/**刷新底部视图数据加载成功标题*/
extern NSString *const  RickyFooterSuccessCompleteTitle;
/**刷新底部视图数据加载失败标题*/
extern NSString *const  RickyFooterErrorCompleteTitle;
/**刷新底部视图数据加载无更多数据标题*/
extern NSString *const  RickyFooterNoDataCompleteTitle;

/**刷新顶部视图标题文字大小*/
extern CGFloat const  RickyHeaderTitleFontSize;

/**动画刷新控件的动画时长*/
extern NSTimeInterval const  RickyGifAnimationDuration;
/**动画刷新控件的动画移动时长*/
extern NSTimeInterval const  RickyGifMoveAnimationDuration;
/**刷新控件动画时长*/
extern NSTimeInterval const    RickyAnimationDuration;
/**数据刷新（加载）回调展示信息时长*/
extern NSTimeInterval const    RickyCompleteDuration;

/******************************得到某短文字的相关信息（宽，高）**************************/
#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 60000
#define MBLabelAlignmentCenter NSTextAlignmentCenter
#else
#define MBLabelAlignmentCenter UITextAlignmentCenter
#endif

#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000
#define MB_TEXTSIZE(text, font) [text length] > 0 ? [text \
sizeWithAttributes:@{NSFontAttributeName:font}] : CGSizeZero;
#else
#define MB_TEXTSIZE(text, font) [text length] > 0 ? [text sizeWithFont:font] : CGSizeZero;
#endif

#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000
#define MB_MULTILINE_TEXTSIZE(text, font, maxSize, mode) [text length] > 0 ? [text \
boundingRectWithSize:maxSize options:(NSStringDrawingUsesLineFragmentOrigin) \
attributes:@{NSFontAttributeName:font} context:nil].size : CGSizeZero;
#else
#define MB_MULTILINE_TEXTSIZE(text, font, maxSize, mode) [text length] > 0 ? [text \
sizeWithFont:font constrainedToSize:maxSize lineBreakMode:mode] : CGSizeZero;
#endif

/******************************刷新颜色**************************/
#define RickyStrokeColor [UIColor colorWithRed:202.0/255 green:96.0/255 blue:32.0/255 alpha:1.0]
#define RickyMarkColor [UIColor colorWithRed:70.0/255 green:68.0/255 blue:71.0/255 alpha:1.0]

@interface RickyRefreshConst : NSObject

@end
